<template>
	<view class="btn-wrap">
		<view class="button" @tap="handleSub">{{subTxt}}</view>
	</view>
</template>

<script>
	export default {
		name: "sub-btn",
		props: {
			subTxt: {
				type: String,
				default: '保存'
			},
		},
		methods: {
			handleSub() {
				this.$emit('sub', 123)
			}
		}
	}
</script>

<style lang="scss" scoped>
	.btn-wrap {
		width: 100%;
		height: 70rpx;
		display: flex;
		justify-content: center;
		align-items: center;
		margin-top: 60rpx;
	}

	.btn-wrap .button {
		border: none;
		width: 90%;
		height: 70rpx;
		line-height: 70rpx;
		display: flex;
		justify-content: center;
		align-items: center;
		background-color: $global-color-golden;
		border-radius: 35rpx;
		color: #fff;
		font-size: 32rpx;
		font-weight: 400;
	}
</style>